<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    // 百钱买百鸡   公鸡每只5元，母鸡每只3元，三只小鸡1元，用100元买100只鸡，问公鸡、母鸡、小鸡各多少只？


    let a = 0
    let b = 0
    let c = 0

    let result = []

    for (let i = 0; i <= 100; i++) {
        for (let j = 0; j <= 100; j++) {
            for (let k = 0; k <= 100; k++) {
                if (k % 3 === 0 && (i * 5 + j * 3 + k / 3 === 100) && (i + j + k === 100)) {
                    result.push({a: i, b: j, c: k})
                }
            }
        }
    }

    console.log('一共有', result.length, '种')
    console.log(result)
</script>
</body>
</html>
